package com.chats.pojo.vo;


import com.chats.pojo.User;
import lombok.Data;

/**
 * 用户显示对象
 */
@Data
public class UserVO {

    private String id;

    private String username; // 用户名

    private Integer status; // 状态，0:可说话 1:被禁言

    private Integer authority; // 权限，0:用户 1:管理员

    public UserVO(User user) {
        this.id = String.valueOf(user.getId());
        this.username = user.getUsername();
        this.status = user.getStatus();
        this.authority = user.getAuthority();
    }

}
